/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package de.hsmannheim.pepa.patientenportal.apanwep.model.impl;

import com.liferay.portal.kernel.util.StringBundler;
import com.liferay.portal.model.CacheModel;

import de.hsmannheim.pepa.patientenportal.apanwep.model.message_participants;

import java.io.Externalizable;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;

/**
 * The cache model class for representing message_participants in entity cache.
 *
 * @author Cedric Nana
 * @see message_participants
 * @generated
 */
public class message_participantsCacheModel implements CacheModel<message_participants>,
	Externalizable {
	@Override
	public String toString() {
		StringBundler sb = new StringBundler(7);

		sb.append("{ID=");
		sb.append(ID);
		sb.append(", Participant_Id=");
		sb.append(Participant_Id);
		sb.append(", Networkaccesspoint_Id=");
		sb.append(Networkaccesspoint_Id);
		sb.append("}");

		return sb.toString();
	}

	@Override
	public message_participants toEntityModel() {
		message_participantsImpl message_participantsImpl = new message_participantsImpl();

		message_participantsImpl.setID(ID);
		message_participantsImpl.setParticipant_Id(Participant_Id);
		message_participantsImpl.setNetworkaccesspoint_Id(Networkaccesspoint_Id);

		message_participantsImpl.resetOriginalValues();

		return message_participantsImpl;
	}

	@Override
	public void readExternal(ObjectInput objectInput) throws IOException {
		ID = objectInput.readLong();
		Participant_Id = objectInput.readLong();
		Networkaccesspoint_Id = objectInput.readLong();
	}

	@Override
	public void writeExternal(ObjectOutput objectOutput)
		throws IOException {
		objectOutput.writeLong(ID);
		objectOutput.writeLong(Participant_Id);
		objectOutput.writeLong(Networkaccesspoint_Id);
	}

	public long ID;
	public long Participant_Id;
	public long Networkaccesspoint_Id;
}